Fix wrong access to referenced time value.
authoroliskoli <oliskoli@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 7 May 2006 22:29:33 +0000 (22:29 +0000)
committeroliskoli <oliskoli@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 7 May 2006 22:29:33 +0000 (22:29 +0000)
gpsbabel/garmin_txt.c

index 86d4558aa30cca68e1033ccbd77db9baf651e34b..caeea30b5a9eaa91352de3a141c86e3ede1d171a 100644 (file)
@@ -569,7 +569,7 @@ print_speed(double *distance, time_t *time)
        else unit = "kph";
        idist = si_round(dist);
        
-       if ((time != 0) && (idist > 0)) {
+       if ((*time != 0) && (idist > 0)) {
                double speed = dist / (double)*time * SECONDS_PER_HOUR / 1000;
                int ispeed = si_round(speed);